<ion-nav-bar class="nav-title-slide-ios7">
  <div class="bar bar-header bar-assertive item-icon-right" style="z-index: 100">
    <h1 class="title">邀请列表</h1>
    <a class="icon ion-ios-search " style="color: #ffffff;text-decoration: none;" ng-click="vm.dialog()"></a>
  </div>
</ion-nav-bar>

<ion-view title="邀请列表">
  <ion-content>
    <div growl
         style="z-index: 11;position: absolute;width: 60%;margin-left: 20%;margin-top: 50px"></div>
    <div style="margin-top: 44px">
      <!-- Default panel contents -->
      <div ng-show="vm.showSubscribing">
        <div class="row div-item" >
          <div class="col col-15 div-title">姓名</div>
          <div class="col col-30 div-title">手机号</div>
          <div class="col col-30 div-title">预约时间</div>
          <div class="col col-25 div-title">剩余(天)</div>
        </div>
      </div>
      <div ng-show="vm.showSubscribed">
        <div class="row div-item" >
          <div class="col col-15 div-title">姓名</div>
          <div class="col col-30 div-title">手机号</div>
          <div class="col col-30 div-title">注册时间</div>
          <div class="col col-25 div-title">渠道</div>
        </div>
      </div>
    </div>
    <ion-list>
      <ion-item ng-repeat="item in vm.items"  class="item-fix">
        <div class="row div-content " style="border:solid 1px #E5E5E5" >
          <div class="col col-15 div-content-col ">{{item.name}}</div>
          <div class="col col-30 div-content-col">{{item.mobile}}</div>
          <div class="col col-30 div-content-col" ng-show="vm.showSubscribing">{{item.subscribeAt}}</div>
          <div class="col col-30 div-content-col" ng-show="vm.showSubscribed">{{item.registerAt}}</div>
          <div class="col col-25 div-content-col" ng-show="vm.showSubscribing">{{item.validity}}</div>
          <div class="col col-25 div-content-col" ng-show="vm.showSubscribed">
            <span ng-show="item.channel=='SUBSCRIBE'">预约</span>
            <span ng-show="item.channel=='INVITATION_CODE'">邀请码</span>
          </div>
        </div>
      </ion-item>
    </ion-list>
    <!--<ion-refresher on-refresh="vm.doRefresh()" pulling-text="加载更多..." refreshing-text="正在加载..." refreshing-icon="ion-loading-c">-->
    <!--</ion-refresher>-->

    <ion-infinite-scroll
      ng-if = "vm.noMoreDate"
      on-infinite="vm.loadMore()"
      immediate-check="true">
    </ion-infinite-scroll>
  </ion-content>
</ion-view>

<script type="text/ng-template" id="queryList">
  <div style="background-color: #ffffff">
    <form name="queryForm">
      <div class="div-dialog">
        <div style="padding-top: 20px;" ><span style="color:#666666">状态</span>
          <select class="form-control" ng-model="queryForm.status"
                  ng-options="opt as opt.label for opt in options">
          </select>
        </div>
        <div ><span style="color:#666666">时间</span>
          <input type="date" style="width: 30%;background-color: #ffffff" ng-model="queryForm.fromDate"/>
          <span style="color:#666666">--</span>
          <input type="date" style="width: 30%;background-color: #ffffff" ng-model="queryForm.endDate"/>
        </div>
        <div ><span style="color:#666666">手机</span><input type="text" ng-model="queryForm.mobile"/></div>
      </div>
    </form>
    <div class="button-bar" style="border-top:1px solid #e5e5e5;margin-top:27px">
      <a class="button" style="color: #DA251c;border:0;background-color: transparent;border-right: 1px solid #e5e5e5;padding-top:5px" ng-click="confirm(queryForm)">筛选</a>
      <a class="button" style="color: #666666;border:0;background-color: transparent;padding-top:5px" ng-click="closeThisDialog('Cancel')">取消</a>
    </div>
  </div>
</script>
